#pragma once
#include "ElementNode.h"
#include "math.h"
#include "grid3x3.h"
#include "Button.h"
namespace NBGUI
{
	class GUIAPI Tab: public ElementNode, public Grid3x3
	{
	public:
		enum TabState
		{
			Check = 0,
			Uncheck
		};

		Tab(GUIDrawer* drawer, const char* name, const char* eleText, int sizeW, int sizeH, int eleType = NONE, Rect& _rect = Rect() );
		Tab(GUIDrawer* drawer, const char* name, const char* eleText, vec2f* uv, int sizeW, int sizeH, int eleType = NONE, Rect& _rect = Rect() );
		~Tab();

		void buildVI(std::vector<Vertex>* vertices, std::vector<unsigned int>* indices,unsigned int screenWidth, unsigned int screenHeight);

		void draw();
		void doSomething(std::vector<info>& i, std::string& funcName);
		void SwitchTab(int i);
		int getCurrentId(){return currentId;}
		//void handleEvent(Event* e);
	protected:
		vec2f uv[8];
		int state;
		int pageW,pageH;
		Button* page;
		int currentId;
	};
}